<?php
if(!defined('IN_PHPSCUP'))exit('hacking'); 
class MenuApp extends BaseApp
{
    function index()
    {

		if($GLOBALS['SCup']->SCup_user_checking == false)
		{
		$notice = &get_message(array('msg'=>'True!','url'=>SITE_URL,'title'=>'Notice'));
	    $notice ->display(); 

		}	   	

	    $setlang = '';
	    $ty = '1';		
		if(isset($_GET['langid']))
		{
	    $setlang = $_GET['langid']; 		
		}
		if(isset($_GET['ty']))
		{
	    $ty = $_GET['ty']; 		
		}
		
        if(!empty($setlang))
		{
				  if(preg_match("/[.\/]/",$setlang))
		          {
		            $GLOBALS['Lang']->_lang_tp = LANG;
		  
                  } 
				  else
				  {
				  $GLOBALS['Lang']->_lang_tp = $setlang;				  
				  }
		          $GLOBALS['Lang']->_set_lang($GLOBALS['Lang']->_lang_tp);
		}


        $this->assign('langdata', $GLOBALS['Lang']->_get_lang_typesdata());	    
        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', SITE_TITLE);
        $this->assign('page_description', SITE_DESCRIPTION);
        $this->assign('page_keywords', SITE_KEYWORDS);	
        $this->assign('ty', $ty);		
        $this->assign('site_url',SITE_URL);
        $this->assign('langtype', trim($GLOBALS['Lang']->_lang_tp));		
		$this->assign('username',$GLOBALS['SCup']->SCup_user_msg['data']['user_name']);
		
        $this->assign('web_view_dir',SITE_URL.'/admin/view/default/');
		
        $this->display('menu.view.html');
    }


  
}


?>